import React from 'react';
import { Card } from 'antd';
class Content_imgSlide_img extends React.Component {
    render() {
        const{ title, imgSrc, fontSize, showTitle } = this.props;
        return (
            <div style={{padding: '0px', position: 'relative', width: '230px'}}>
                <div style={{position: 'relative', zIndex: 1}}>
                    <img alt="" src={imgSrc} style={{width: '230px', height: '150px', verticalAlign: 'middle'}}/>
                </div>
                {showTitle=='1' ? <div style={{position: 'absolute', bottom: 0 ,zIndex: 2 , background: '#000' ,height: '30px' ,lineHeight: '20px', width: '100%' ,textAlign: 'center', opacity: 0.5}}></div>: ''}
                {showTitle=='1' ? <div style={{position:  'absolute', zIndex: 3, bottom: 0, color: '#fff', height: '35px' ,lineHeight: '35px', textAlign: 'center' ,width: '100%', fontSize: fontSize + 'px',
                    whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'}}>{title}</div>: ''}
            </div>
        );
    }
}

export default Content_imgSlide_img;
